<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('管理角色')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('group[]', $groupdata, null, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-rule'=>'required'])}
        </div>
        <div class="c-help">必填</div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">所属厂:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_id" name="row[factory_id]" value=""  data-rule="required" data-source="factory/index" data-primary-key="id" data-field="name" class="form-control selectpage"  type="text" >
        </div>
        <div class="c-help">必填</div>
    </div>
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="" data-rule="required;username" />
        </div>
        <div class="c-help">必填</div>
    </div>

    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="" data-rule="required" />
        </div>
        <div class="c-help">必填</div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="off" value="" data-rule="password" />
        </div>
        <div class="c-help">必填</div>
    </div>

    <div class="form-group">
        <label for="mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="mobile" name="row[mobile]" value="" data-rule="mobile" />
        </div>
    </div>
    <div class="form-group">
        <label for="job_num" class="control-label col-xs-12 col-sm-2">工号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="job_num" name="row[job_num]" autocomplete="off" value=""  />
        </div>
    </div>
    <div class="form-group">
        <label for="idcard" class="control-label col-xs-12 col-sm-2">身份证号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="idcard" name="row[idcard]" value=""  />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', [ 'normal' => __('Normal'), 'pause' => __('Pause'), 'leave' => __('Leave'), 'other' => __('Other') ])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
